<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Get Json Cookie
 *
 * handle the multidimensional array issue
 *
 */
if ( ! function_exists('get_json_cookie'))
{
	function get_json_cookie($key_name) {
		return object_to_array(json_decode(get_cookie($key_name)));
	}
	
	function set_json_cookie($key_name, $key_array) {
		set_cookie($key_name, json_encode($key_array), 0);
	}
}
